home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / DRVLIB.NIC / OCE2XM / OEMSETUP.INF < prev    next >
INI File  |  1996-07-31  |  55KB  |  1,536 lines

  1. ;***********************************************************************
  2. ;
  3. ; OEMSETNT.INF
  4. ;
  5. ;       Olicom network card and driver SETUP INF file.
  6. ;
  7. ;***********************************************************************
  8.  
  9. ;-----------------------------------------------------------------------
  10. ; OPTION TYPE
  11. ; -----------
  12. ; This identifies the Option type we are dealing with.  The different
  13. ; possible types are:
  14. ;
  15. ; COMPUTER, DISPLAY, MOUSE, KEYBOARD, LAYOUT, SCSI, PRINTER, ...
  16. ;
  17. ;  Types specific to networking:
  18. ;
  19. ; NetAdapter,        a netcard / adapter combination or just a netcard
  20. ; NetDriver,         just a netcard driver
  21. ; NetTransport,      a complete NDIS-compliant TDI transport stack
  22. ; NetService,        an NT networking service
  23. ; NetWork,           a complete network ensemble.
  24. ; NetProvider        a complete network which supports NT MPR protocol
  25. ;-----------------------------------------------------------------------
  26.  
  27. [Identification]
  28.     OptionType = NetAdapter
  29.  
  30. ;-----------------------------------------------------------------------
  31. ; PlatformsSupported
  32. ; ------------------
  33. ; This identifies the platforms supported by the adapter card.
  34. ; Possible types are:
  35. ;
  36. ; ISA and EISA
  37. ;-----------------------------------------------------------------------
  38.  
  39. [PlatformsSupported]
  40.     ISA
  41.     EISA
  42.     MCA
  43.     PCMCIA
  44.  
  45. [LanguagesSupported]
  46.     ENG
  47.  
  48. ;-----------------------------------------------------------------------
  49. ; OPTION LIST
  50. ; -----------
  51. ; This section lists the OEM Option key names.  These keys are locale
  52. ; independent and used to represent the option in a locale independent
  53. ; manner.
  54. ;
  55. ;-----------------------------------------------------------------------
  56.  
  57. [Options]
  58.     OCE2XM
  59.     GOCARD
  60.     GOCARDMF
  61.  
  62. [OptionsTextENG]
  63.     OCE2XM    = "Olicom Ethernet ISA/IV Adapter"
  64.     GOCARD    = "Olicom Ethernet GoCard"
  65.     GOCARDMF  = "Olicom GoCard ET/Modem 288"
  66.  
  67. [IOBaseAddrChoices]
  68. IOBase_1  = "Auto detect",0
  69. IOBase_2  = "200h",512
  70. IOBase_3  = "210h",528
  71. IOBase_4  = "220h",544
  72. IOBase_5  = "230h",560
  73. IOBase_6  = "240h",576
  74. IOBase_7  = "250h",592
  75. IOBase_8  = "260h",608
  76. IOBase_9  = "270h",624
  77. IOBase_10 = "280h",640
  78. IOBase_11 = "290h",656
  79. IOBase_12 = "2A0h",672
  80. IOBase_13 = "2B0h",698
  81. IOBase_14 = "2C0h",714
  82. IOBase_15 = "2D0h",730
  83. IOBase_16 = "2E0h",746
  84. IOBase_17 = "2F0h",752
  85. IOBase_18 = "300h",768
  86. IOBase_19 = "310h",784
  87. IOBase_20 = "320h",800
  88. IOBase_21 = "330h",816
  89. IOBase_22 = "340h",832
  90. IOBase_23 = "350h",848
  91. IOBase_24 = "360h",864
  92. IOBase_25 = "370h",880
  93. IOBase_26 = "380h",896
  94. IOBase_27 = "390h",912
  95. IOBase_28 = "3A0h",928
  96. IOBase_29 = "3B0h",944
  97. IOBase_30 = "3C0h",960
  98. IOBase_31 = "3D0h",976
  99. IOBase_30 = "3E0h",992
  100.  
  101.  
  102. [BusNumberChoices]
  103. BusNo_1 = "0",0
  104. BusNo_2 = "1",1
  105. BusNo_3 = "2",2
  106. BusNo_4 = "3",3
  107. BusNo_5 = "4",4
  108. BusNo_6 = "5",5
  109. BusNo_7 = "6",6
  110. BusNo_8 = "7",7
  111.  
  112. [IOBasePCMCIAChoices]
  113. ; 3E0h is where PCIC is (normally) located
  114. ; 240h is where TCIC is (normally) located
  115. ; therefore user cannot select these for locating the adapter
  116. IOBase_1  = "200h",512
  117. IOBase_2  = "220h",544
  118. ;IOBase_3  = "240h",576
  119. IOBase_4  = "260h",608
  120. IOBase_5  = "280h",640
  121. IOBase_6  = "2A0h",672
  122. IOBase_7  = "2C0h",714
  123. IOBase_8  = "2E0h",746
  124. IOBase_9  = "300h",768
  125. IOBase_10 = "320h",800
  126. IOBase_11 = "340h",832
  127. IOBase_12 = "360h",864
  128. IOBase_13 = "380h",896
  129. IOBase_14 = "3A0h",928
  130. IOBase_15 = "3C0h",960
  131.  
  132. [MemWinChoices]
  133. MemWin_1  = "A0000h", 655360
  134. MemWin_2  = "A1000h", 659456
  135. MemWin_3  = "A2000h", 663552
  136. MemWin_4  = "A3000h", 667648
  137. MemWin_5  = "A4000h", 671744
  138. MemWin_6  = "A5000h", 675840
  139. MemWin_7  = "A6000h", 679936
  140. MemWin_8  = "A7000h", 684032
  141. MemWin_9  = "A8000h", 688128
  142. MemWin_10 = "A9000h", 692224
  143. MemWin_11 = "AA000h", 696320
  144. MemWin_12 = "AB000h", 700416
  145. MemWin_13 = "AC000h", 704512
  146. MemWin_14 = "AD000h", 708608
  147. MemWin_15 = "AE000h", 712704
  148. MemWin_16 = "AF000h", 716800
  149. MemWin_17 = "B0000h", 720896
  150. MemWin_18 = "B1000h", 724992
  151. MemWin_19 = "B2000h", 729088
  152. MemWin_20 = "B3000h", 733184
  153. MemWin_21 = "B4000h", 737280
  154. MemWin_22 = "B5000h", 741376
  155. MemWin_23 = "B6000h", 745472
  156. MemWin_24 = "B7000h", 749568
  157. MemWin_25 = "B8000h", 753664
  158. MemWin_26 = "B9000h", 757760
  159. MemWin_27 = "BA000h", 761856
  160. MemWin_28 = "BB000h", 765952
  161. MemWin_29 = "BC000h", 770048
  162. MemWin_30 = "BD000h", 774144
  163. MemWin_31 = "BE000h", 778240
  164. MemWin_32 = "BF000h", 782336
  165. MemWin_33 = "C0000h", 786432
  166. MemWin_34 = "C1000h", 790528
  167. MemWin_35 = "C2000h", 794624
  168. MemWin_36 = "C3000h", 798720
  169. MemWin_37 = "C4000h", 802816
  170. MemWin_38 = "C5000h", 806912
  171. MemWin_39 = "C6000h", 811008
  172. MemWin_40 = "C7000h", 815104
  173. MemWin_41 = "C8000h", 819200
  174. MemWin_42 = "C9000h", 823296
  175. MemWin_43 = "CA000h", 827392
  176. MemWin_44 = "CB000h", 831488
  177. MemWin_45 = "CC000h", 835584
  178. MemWin_46 = "CD000h", 839680
  179. MemWin_47 = "CE000h", 843776
  180. MemWin_48 = "CF000h", 847872
  181. MemWin_49 = "D0000h", 851968
  182. MemWin_50 = "D1000h", 856064
  183. MemWin_51 = "D2000h", 860160
  184. MemWin_52 = "D3000h", 864256
  185. MemWin_53 = "D4000h", 868352
  186. MemWin_54 = "D5000h", 872448
  187. MemWin_55 = "D6000h", 876544
  188. MemWin_56 = "D7000h", 880640
  189. MemWin_57 = "D8000h", 884736
  190. MemWin_58 = "D9000h", 888832
  191. MemWin_59 = "DA000h", 892928
  192. MemWin_60 = "DB000h", 897024
  193. MemWin_61 = "DC000h", 901120
  194. MemWin_62 = "DD000h", 905216
  195. MemWin_63 = "DE000h", 909312
  196. MemWin_64 = "DF000h", 913408
  197. MemWin_65 = "E0000h", 917504
  198. MemWin_66 = "E1000h", 921600
  199. MemWin_67 = "E2000h", 925696
  200. MemWin_68 = "E3000h", 929792
  201. MemWin_69 = "E4000h", 933888
  202. MemWin_70 = "E5000h", 937984
  203. MemWin_71 = "E6000h", 942080
  204. MemWin_72 = "E7000h", 946176
  205. MemWin_73 = "E8000h", 950272
  206. MemWin_74 = "E9000h", 954368
  207. MemWin_75 = "EA000h", 958464
  208. MemWin_76 = "EB000h", 962560
  209. MemWin_77 = "EC000h", 966656
  210. MemWin_78 = "ED000h", 970752
  211. MemWin_79 = "EE000h", 974848
  212. MemWin_80 = "EF000h", 978944
  213. MemWin_81 = "F0000h", 983040
  214. MemWin_82 = "F1000h", 987136
  215. MemWin_83 = "F2000h", 991232
  216. MemWin_84 = "F3000h", 995328
  217. MemWin_85 = "F4000h", 999424
  218. MemWin_86 = "F5000h", 1003520
  219. MemWin_87 = "F6000h", 1007616
  220. MemWin_88 = "F7000h", 1011712
  221. MemWin_89 = "F8000h", 1015808
  222. MemWin_90 = "F9000h", 1019904
  223. MemWin_91 = "FA000h", 1024000
  224. MemWin_92 = "FB000h", 1028096
  225. MemWin_93 = "FC000h", 1032192
  226. MemWin_94 = "FD000h", 1036288
  227. MemWin_95 = "FE000h", 1040384
  228. MemWin_96 = "FF000h", 1044480
  229.  
  230. [InterruptChoices]
  231. Interrupt_1  = "3", 3
  232. Interrupt_2  = "4", 4
  233. Interrupt_3  = "5", 5
  234. Interrupt_4  = "7", 7
  235. Interrupt_5  = "9", 9
  236. Interrupt_6  = "10",10
  237. Interrupt_7  = "11",11
  238. Interrupt_8  = "12",12
  239. Interrupt_9  = "14",14
  240. Interrupt_10 = "15",15
  241.  
  242. [ComPortChoices]
  243. Com_1 = "COM1", 1016
  244. Com_2 = "COM2", 760
  245. Com_3 = "COM3", 1000
  246. Com_4 = "COM4", 744
  247. Com_5 = "COM5", 24
  248. Com_6 = "Disabled", 0
  249.  
  250. [IOBasePCMCIAControllerChoices]
  251. IOBase_1  = "Default",992
  252. IOBase_2  = "3E2h",994
  253. IOBase_3  = "Disable PCMCIA",0
  254.  
  255. [WaitstateChoices]
  256. Waitstate_1  = "0", 0
  257. Waitstate_2  = "1", 1
  258. Waitstate_3  = "2", 2
  259. Waitstate_4  = "3", 3
  260. Waitstate_5  = "4", 4
  261. Waitstate_6  = "5", 5
  262. Waitstate_7  = "6", 6
  263. Waitstate_8  = "7", 7
  264. Waitstate_9  = "8", 8
  265. Waitstate_10 = "9", 9
  266. Waitstate_11 = "10",10
  267. Waitstate_12 = "11",11
  268. Waitstate_13 = "12",12
  269. Waitstate_14 = "13",13
  270. Waitstate_15 = "14",14
  271. Waitstate_16 = "15",15
  272.  
  273. [DatasizeChoices]
  274. Datasize_1 = 1,1,"&16 Bit"
  275. Datasize_2 = 2,0,"&8 Bit"
  276.  
  277. ;-----------------------------------------------------------------------
  278. ; Constants for use with dialogs
  279. ;-----------------------------------------------------------------------
  280.  
  281. [FileConstants]
  282. UtilityInf      = "UTILITY.INF"
  283. subroutineinf   = "SUBROUTN.INF"
  284. SoftwareType    = "driver"
  285. Exit_Code       = 0
  286. DialogDllName    = "oce2xm.dll"
  287. HelpfileName    = "oce2xm.hlp"
  288. NetEventDLL     = "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\Drivers\Oc2xem.sys"
  289. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  290. Manufacturer    = "Olicom"
  291. ProductMajorVersion     = "3"
  292. ProductMinorVersion     = "0"
  293. ProductVersion          = $(ProductMajorVersion)"."$(ProductMinorVersion)
  294. ProductSoftwareName     = "OCE2XM"
  295. ProductSoftwareTitle    = "Olicom Ethernet Adapter Driver"
  296. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\oce2xm.sys"
  297. NetRuleSoftwareType     = "oce2xmSys ndisDriver oce2xmDriver"
  298. NetRuleSoftwareUse      = $(SoftwareType)
  299. NetRuleSoftwareBindForm = """Oce1xMPSys"" yes no container"
  300. NetRuleSoftwareClass    = {"oce2xmDriver basic"}
  301. NetRuleSoftwareBindable = {"oce2xmDriver oce2xmAdapter non exclusive 100"}
  302. ProductHardwareName     = "OCE2XM"
  303. ProductHardwareTitle    = "Olicom Ethernet Adapter"
  304. ProductHardwareOCE2XMTitle    = "Olicom Ethernet ISA/IV Adapter"
  305. ProductHardwareGOCARDTitle    = "Olicom GoCard Ethernet"
  306. ProductHardwareGOCARDMFTitle  = "Olicom GoCard ET/Modem 288"
  307. NetRuleHardwareType     = "oce2xm oce2xmAdapter"
  308. NetRuleHardwareBindForm = " yes yes container"
  309. NetRuleHardwareClass    = {"oce2xmAdapter basic"}
  310. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  311. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  312.  
  313. [GeneralConstants]
  314. from      = ""
  315. to        = ""
  316. ExitCodeOk     = 0
  317. ExitCodeCancel = 1
  318. ExitCodeFatal  = 2
  319. KeyNull         = ""
  320. MAXIMUM_ALLOWED   = 33554432
  321. RegistryErrorIndex = NO_ERROR
  322. KeyProduct      = ""
  323. KeyParameters   = ""
  324. TRUE            = 1
  325. FALSE           = 0
  326. NoTitle         = 0
  327. ExitState       = "Active"
  328. OldVersionExisted = $(FALSE)
  329. DriverPath      = $(!STF_NTPATH)\drivers
  330. [FileConstantsENG]
  331. ProCaption   = "Windows NT Setup"
  332. ProCancel    = "Cancel"
  333. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  334.                "Are you sure you want to cancel copying files?"
  335. ProCancelCap = "Network Setup Message"
  336. ProText1     = "Copying:"
  337. ProText2     = "To:"
  338. OCE2XMFunctionTitle    = "Olicom Ethernet ISA/IV Adapter Setup"
  339. GOCARDFunctionTitle    = "Olicom GoCard Ethernet Setup"
  340. GOCARDMFFunctionTitle  = "Olicom GoCard ET/Modem 288 Setup"
  341. ProductHardwareOCE2XMDescription    = "Olicom Ethernet ISA/IV Adapter"
  342. ProductHardwareGOCARDDescription    = "Olicom GoCard Ethernet"
  343. ProductHardwareGOCARDMFDescription  = "Olicom GoCard ET/Modem 288"
  344. ProductSoftwareDescription        = "Olicom Ethernet Adapter Driver"
  345. FunctionTitle   = $($(Option)FunctionTitle)
  346.  
  347. IOBaseAddrList = ^(IOBaseAddrChoices, 1)
  348. IOBaseAddrValues = ^(IOBaseAddrChoices, 2)
  349. BusNoList = ^(BusNumberChoices, 1)
  350. BusNoValues = ^(BusNumberChoices, 2)
  351. IOBasePCMCIAList = ^(IOBasePCMCIAChoices, 1)
  352. IOBasePCMCIAValues = ^(IOBasePCMCIAChoices, 2)
  353. MemWinList = ^(MemWinChoices, 1)
  354. MemWinValues = ^(MemWinChoices, 2)
  355. InterruptList = ^(InterruptChoices, 1)
  356. InterruptValues = ^(InterruptChoices, 2)
  357. ComPortList = ^(ComPortChoices, 1)
  358. ComPortValues = ^(ComPortChoices, 2)
  359. IOBasePCMCIAControllerList = ^(IOBasePCMCIAControllerChoices, 1)
  360. IOBasePCMCIAControllerValues = ^(IOBasePCMCIAControllerChoices, 2)
  361. WaitstateList = ^(WaitstateChoices, 1)
  362. WaitstateValues = ^(WaitstateChoices, 2)
  363. DatasizeList = ^(DatasizeChoices, 1)
  364. DatasizeValues = ^(DatasizeChoices, 2)
  365. DatasizeLabels = ^(DatasizeChoices, 3)
  366.  
  367. IOBaseDefault        = 1
  368. BusNoDefault        = 1
  369. IOBasePCMCIADefault = 8
  370. MemWinDefault        = 49
  371. ComPortDefault        = 3
  372. InterruptDefault    = 3
  373.  
  374. [DialogConstantsENG]
  375. Help        = "&Help"
  376. Exit        = "Cancel"
  377. OK          = "OK"
  378. HelpContext = ""
  379. Continue    = "Continue"
  380. Cancel      = "Cancel"
  381. ContextMinimumID    = 6000
  382. ContextContentsID    = 6000
  383. ContextPCMCIASetupID    = 6000
  384. ContextPCMCIAAdvancedID = 6020
  385. ContextMaximumID    = 6020
  386.  
  387. [date]
  388.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  389.  
  390. [AskSourceDlgText]
  391.     DlgText       = "Please enter the full path of the Olicom Ethernet Adapter "+
  392.              "driver setup files. Then choose Continue."
  393.  
  394. ;-----------------------------------------------------------------------
  395. ; ADAPTER PARAMETER DIALOG
  396. ; ------------------------
  397. ; This section sets up the adapter parameter dialog. All textstrings
  398. ; presented in this dialog are defined here.
  399. ;
  400. ;-----------------------------------------------------------------------
  401.  
  402. [AdapterParameterDlgENG]
  403. DlgType = "RadioCombination"
  404. DlgTemplate = "OCE2DLG"
  405. Caption = $(FunctionTitle)
  406. DlgText = "Please select values for the following fields:"
  407. Free        = "&PCMCIA..."
  408. Combo1Label = "I/O &Base Address:"
  409. Combo2Label = "&Bus Number:"
  410. Edit1Label = "&Network Address:"
  411. Combo1List = $(IOBaseAddrList)
  412. Combo1Out  = $(IOBaseAddrIndex)
  413. Combo2List = $(BusNoList)
  414. Combo2Out  = $(BusNoIndex)
  415. ComboListItemsIn  = {Combo1List, Combo2List}
  416. ComboListItemsOut = {Combo1Out, Combo2Out}
  417. EditTextLim = 17
  418. EditTextIn = $(NetworkAddress)
  419. RadioOptionGreyed = {}
  420. CBOptionsGreyed = {}
  421. NotifyFields = {NO, NO, NO, NO, NO}
  422. HelpContext = $(ContextContentsID)
  423.  
  424. ;-----------------------------------------------------------------------
  425. ; PCMCIA PARAMETER DIALOG
  426. ; -----------------------
  427. ; This section sets up the PCMCIA parameter dialog. All textstrings
  428. ; presented in this dialog are defined here.
  429. ;
  430. ;-----------------------------------------------------------------------
  431.  
  432. [PCMCIAParameterDlgENG]
  433. DlgType = "RadioCombination"
  434. DlgTemplate = "OCE2DLGP"
  435. Caption = $(FunctionTitle)
  436. DlgText = "Please select values for the following fields:"
  437. Free        = "&Advanced..."
  438. Combo1Label = "I/O &Base Address:"
  439. Combo2Label = "&Memory Window:"
  440. Combo3Label = "&Interrupt:"
  441. Combo4Label = "&Bus Number:"
  442. Combo5Label = "&COM Port:"
  443. Edit1Label  = "&Network Address:"
  444. Combo1List = $(IOBasePCMCIAList)
  445. Combo1Out  = $(IOBasePCMCIAIndex)
  446. Combo2List = $(MemWinList)
  447. Combo2Out  = $(MemWinIndex)
  448. Combo3List = $(InterruptList)
  449. Combo3Out  = $(InterruptIndex)
  450. Combo4List = $(BusNoList)
  451. Combo4Out  = $(BusNoIndex)
  452. Combo5List = $(ComPortList)
  453. Combo5Out  = $(ComPortIndex)
  454. ComboListItemsIn  = {Combo1List, Combo2List, Combo3List, Combo4List, Combo5List}
  455. ComboListItemsOut = {Combo1Out, Combo2Out, Combo3Out, Combo4Out, Combo5Out}
  456. EditTextLim = 15
  457. EditTextIn = $(NetworkAddress)
  458. RadioOptionGreyed = {}
  459. CBOptionsGreyed = {}
  460. NotifyFields = {NO, NO, NO, NO, NO}
  461. HelpContext = $(ContextPCMCIASetupID)
  462.  
  463. ;-----------------------------------------------------------------------
  464. ; PCMCIA ADVANCED SETTINGS DIALOG
  465. ; -------------------------------
  466. ; This section sets up the PCMCIA adavanced settings dialog. All
  467. ; textstrings presented in this dialog are defined here.
  468. ;
  469. ;-----------------------------------------------------------------------
  470.  
  471. [PCMCIAAdvancedDlgENG]
  472. DlgType = "RadioCombination"
  473. DlgTemplate = "OCE2DLGPA"
  474. Caption = "PCMCIA Advanced Settings"
  475. DlgText = "Please select values for the following fields:"
  476. Combo1Label = "&Controller I/O Base:"
  477. Combo2Label = "&Additional Waitstates:"
  478. Radio1Label = "&Datasize:"
  479. Radio1Button1 = *($(DatasizeLabels),1)
  480. Radio1Button2 = *($(DatasizeLabels),2)
  481. Combo1List = $(IOBasePCMCIAControllerList)
  482. Combo1Out  = $(IOBasePCMCIAControllerIndex)
  483. Combo2List = $(WaitstateList)
  484. Combo2Out  = $(WaitstateIndex)
  485. ComboListItemsIn  = {Combo1List, Combo2List}
  486. ComboListItemsOut = {Combo1Out, Combo2Out}
  487. RadioIn = { $(DatasizeIndex) }
  488. RadioOptionGreyed = {}
  489. CBOptionsGreyed = {}
  490. NotifyFields = {NO, NO, NO, NO, NO}
  491. HelpContext = $(ContextPCMCIAAdvancedID)
  492.  
  493. ;---------------------------------------------------------------------------
  494. ; 1. Identify
  495. ;
  496. ; DESCRIPTION:   To verify that this INF deals with the same type of options
  497. ;                as we are choosing currently.
  498. ;
  499. ; INPUT:         None
  500. ;
  501. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL
  502. ;                $($R1): Option Type (COMPUTER ...)
  503. ;                $($R2): Diskette description
  504. ;---------------------------------------------------------------------------
  505.  
  506. [Identify]
  507.     read-syms Identification
  508.     set Status     = STATUS_SUCCESSFUL
  509.     set Identifier = $(OptionType)
  510.     set Media      = #("Source Media Descriptions", 1, 1)
  511.     Return $(Status) $(Identifier) $(Media)
  512.  
  513. ;------------------------------------------------------------------------
  514. ; 2. ReturnOptions:
  515. ;
  516. ; DESCRIPTION:   To return the option list supported by this INF and the
  517. ;                localised text list representing the options.
  518. ;
  519. ;
  520. ; INPUT:         $($0):  Language used. ( ENG | FRN | ... )
  521. ;
  522. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  523. ;                                STATUS_NOLANGUAGE
  524. ;                                STATUS_FAILED
  525. ;                                STATUS_NOTSUPPORTED
  526. ;
  527. ;                $($R1): Option List
  528. ;                $($R2): Option Text List
  529. ;------------------------------------------------------------------------
  530.  
  531. [ReturnOptions]
  532.     set Status         = STATUS_FAILED
  533.     set OptionList     = {}
  534.     set OptionTextList = {}
  535.     set LanguageList = ^(LanguagesSupported, 1)
  536.     Ifcontains(i) $($0) in $(LanguageList)
  537.         ifstr(i) $($1) == ""
  538.            goto returnoptions
  539.         endif
  540.         set PlatformList = ^(PlatformsSupported, 1)
  541.         Ifcontains(i) $($1) in $(PlatformList)
  542.            goto returnoptions
  543.         else
  544.            set Status = STATUS_NOTSUPPORTED
  545.            goto finish_ReturnOptions
  546.         endif
  547.     else
  548.         set Status = STATUS_NOLANGUAGE
  549.         goto finish_ReturnOptions
  550.     endif
  551. returnoptions = +
  552.     set OptionList     = ^(Options, 1)
  553.     set OptionTextList = ^(OptionsText$($0), 1)
  554.     set Status         = STATUS_SUCCESSFUL
  555. finish_ReturnOptions = +
  556.     Return $(Status) $(OptionList) $(OptionTextList)
  557.  
  558. ;------------------------------------------------------------------------
  559. ;
  560. ; InstallOption:
  561. ;
  562. ;      This section is shelled to by main installation processing
  563. ;      or by NCPASHEL.INF during reconfig, removal, update, etc.
  564. ;
  565. ;
  566. ; FUNCTION:  To copy files representing Options
  567. ;            To configure the installed option
  568. ;            To update the registry for the installed option
  569. ;
  570. ; INPUT:     $($0):  Language to use
  571. ;            $($1):  OptionID to install
  572. ;            $($2):  SourceDirectory
  573. ;            $($3):  AddCopy  (YES | NO)
  574. ;            $($4):  DoCopy   (YES | NO)
  575. ;            $($5):  DoConfig (YES | NO)
  576. ;
  577. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  578. ;                            STATUS_NOLANGUAGE |
  579. ;                            STATUS_USERCANCEL |
  580. ;                            STATUS_FAILED
  581. ;
  582. ;------------------------------------------------------------------------
  583.  
  584. [InstallOption]
  585.     StartWait
  586.     set SrcDir   = ""
  587.     set Option   = $($1)
  588.     set SrcDir   = $($2)
  589.     set AddCopy  = $($3)
  590.     set DoCopy     = $($4)
  591.     set DoConfig = $($5)
  592.     ;ifstr(i) $(SrcDir) == ""
  593.     ;   Set SrcDir = "A:\"
  594.     ;Endif
  595.     set LanguageList = ^(LanguagesSupported, 1)
  596.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  597.         Return STATUS_NOLANGUAGE
  598.     endif
  599.     Debug-Output "STF_CWDDIR is: "$(!STF_CWDDIR)
  600.     Debug-Output "STF_LANGUAGE is: "$(!STF_LANGUAGE)
  601.     set-subst LF = "\n"
  602.     read-syms GeneralConstants
  603.     read-syms FileConstants
  604.     read-syms DialogConstants$(!STF_LANGUAGE)
  605.     ifstr(i) $(!NTN_Origination) == "NCPA"
  606.         set Continue = "OK"
  607.     endif
  608.     read-syms FileConstants$(!STF_LANGUAGE)
  609.     detect date
  610.     set-title  $(FunctionTitle)
  611.     set to   = Begin
  612.     set from = Begin
  613.     set CommonStatus = STATUS_SUCCESSFUL
  614.     SetHelpFile $(HelpfileName) $(ContextMinimumID) $(ContextMaximumID)
  615.     EndWait
  616. Begin = +
  617.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  618.         set StartLabel = removeadapter
  619.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  620.         set StartLabel = UpgradeSoftware
  621.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  622.         set StartLabel = bindingadapter
  623.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  624.         set StartLabel = configureadapter
  625.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  626.             Debug-Output "Cannot configure the driver software."
  627.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  628.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  629.                 Debug-Output "ShellCode error: cannot get an error string."
  630.                 goto ShellCodeError
  631.             endif
  632.             set Error = $($R0)
  633.             set from = end
  634.             set to = end
  635.             goto nonfatalinfo
  636.         endif
  637.     else
  638.         set StartLabel = installadapter
  639.         set OEM_ABANDON_OPTIONS = {}
  640.         set OEM_ABANDON_SOFTWARE = FALSE
  641.         set OEM_ABANDON_ON = TRUE
  642.     endif
  643.     set IOBaseAddrIndex = *($(IOBaseAddrList), $(IOBaseDefault))
  644.     set BusNoIndex = *($(BusNoList), $(BusNoDefault))
  645.     set NetworkAddress = *($(EditTextOut), 1)
  646.     set IOBasePCMCIAIndex = *($(IOBasePCMCIAList), $(IOBasePCMCIADefault))
  647.     set MemWinIndex = *($(MemWinList), $(MemWinDefault))
  648.     set ComPortIndex = *($(ComPortList), $(ComPortDefault))
  649.     set InterruptIndex = *($(InterruptList), $(InterruptDefault))
  650.     set IOBasePCMCIAControllerIndex = *($(IOBasePCMCIAControllerList), 1)
  651.     set WaitstateIndex = *($(WaitstateList), 1)
  652.     set DatasizeIndex = 1
  653.     Shell "" DebugConfiguration "After parameter querying"
  654.     Shell $(UtilityInf), GetBusTypeNum
  655.     set BusTypeNum = $($R1)
  656.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  657.         Debug-Output "ShellCode error."
  658.         goto ShellCodeError
  659.     endif
  660.     Set from = $(fatal)
  661.     Set to = $(fatal)
  662.     Goto $(StartLabel)
  663.  
  664. ;-----------------------------------------------
  665. ; Installation Section
  666. ;-----------------------------------------------
  667. ;
  668. ;   Get the current values of all the parameters
  669. ;
  670. installadapter = +
  671.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  672.     Ifstr $(KeyProduct) != $(KeyNull)
  673.         CloseRegKey $(KeyProduct)
  674.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  675.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  676.                $(ProductVersion)
  677.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  678.                Debug-Output "ShellCode error: cannot get an error string."
  679.                goto ShellCodeError
  680.            endif
  681.            goto end
  682.         else
  683.            Shell $(UtilityInf), CardExistedDlg
  684.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  685.                Debug-Output "ShellCode error: cannot get an error string."
  686.                goto ShellCodeError
  687.            endif
  688.            ifstr(i) $($R1) != "OK"
  689.                goto end
  690.            endif
  691.            set OldVersionExisted = $(TRUE)
  692.         endif
  693.     endif
  694.     ifint $(OldVersionExisted) == $(FALSE)
  695.     Ifstr(i) $(SrcDir) == ""
  696.            read-syms AskSourceDlgText
  697.            Shell $(subroutineinf) DoAskSourceEx $(SrcDir) $(DlgText)
  698.            Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  699.               Goto ShellCodeError
  700.            Else-Ifstr(i) $($R0) == STATUS_FAILED
  701.                Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  702.                ifint $($ShellCode) != $(!SHELL_CODE_OK)
  703.                    goto ShellCodeError
  704.                endif
  705.                set Error = $($R0)
  706.                Goto fatal
  707.            Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  708.                Goto successful
  709.            Endif
  710.            Set SrcDir = $($R1)
  711.         Endif
  712.     install "Install-Dll"
  713.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  714.            Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  715.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  716.                goto ShellCodeError
  717.            endif
  718.            set Error = $($R0)
  719.            goto fatal
  720.         endif
  721.     endif
  722.     Goto adapteroptions
  723.  
  724. ;-----------------------------------------------
  725. ; Configuration Section
  726. ;-----------------------------------------------
  727. ;
  728. ;   Get the current values of all the parameters
  729. ;
  730. configureadapter = +
  731.     Ifstr(i) $(KeyProduct) == $(KeyNull)
  732.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  733.         Ifstr $(KeyProduct) == $(KeyNull)
  734.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  735.             Debug-Output "Cannot find component product key"
  736.         goto fatalregistry
  737.         Endif
  738.     Endif
  739.     Debug-Output "INF: Shelling to FindService"
  740.     Shell $(UtilityInf) FindService, $(KeyProduct)
  741.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  742.         Debug-Output "INF: FindService shell failure"
  743.         Goto ShellCodeError
  744.     Endif
  745.     Ifstr(i) $($R0) != NO_ERROR
  746.         Debug-Output "INF: FindService Shell error: "$($R0)
  747.         Goto fatalregistry
  748.     endif
  749.     Set KeyParameters = $($R2)
  750.     CloseRegKey $($R1)
  751.     Ifstr $(KeyParameters) == $(KeyNull)
  752.     set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  753.         Debug-Output "Cannot find component service"
  754.         goto fatalregistry
  755.     endif
  756.     set OldVersionExisted = $(TRUE)
  757.     set ValueName = ""
  758.     set ValueData = ""
  759.     set ValueStr  = ""
  760.     set ValueList = {}
  761.     EnumRegValue $(KeyParameters) ValueList
  762.     ForListDo $(ValueList)
  763.         set ValueItem = $($)
  764.         set ValueName = *($(ValueItem),1)
  765.         set ValueData = *($(ValueItem),4)
  766.     ifstr(i) $(ValueName) == "IoBase"
  767.         set IOBaseAddrValue = $(ValueData)
  768.     else-ifstr(i) $(ValueName) == "BusNumber"
  769.         set BusNoValue = $(ValueData)
  770.     else-ifstr(i) $(ValueName) == "NetworkAddress"
  771.         set NetworkAddress = $(ValueData)
  772.     else-ifstr(i) $(ValueName) == "IoBaseAddress"
  773.         set IOBasePCMCIAValue = $(ValueData)
  774.     else-ifstr(i) $(ValueName) == "PCCARDAttributeMemoryAddress"
  775.         set MemWinValue = $(ValueData)
  776.     else-ifstr(i) $(ValueName) == "InterruptNumber"
  777.         set InterruptValue = $(ValueData)
  778.     else-ifstr(i) $(ValueName) == "ComPortBase"
  779.         set ComPortValue = $(ValueData)
  780.     else-ifstr(i) $(ValueName) == "PcmciaCtrlBase"
  781.         set IOBasePCMCIAControllerValue = $(ValueData)
  782.     else-ifstr(i) $(ValueName) == "WaitStates"
  783.             set WaitstateValue = $(ValueData)
  784.     else-ifstr(i) $(ValueName) == "DataSize"
  785.         set DatasizeValue = $(ValueData)
  786.         endif
  787.     EndForListDo
  788.     ;
  789.     ; Combo-lists and radio-buttons use a special list of parameter-names
  790.     ; when dialogs are executed. The following section converts the actual
  791.     ; values into the corresponding names (indexes). If a value is undefined,
  792.     ; the first entry in the index-list is used.
  793.     ;
  794.     set IOBaseAddrIndex = *($(IOBaseAddrList), ~($(IOBaseAddrValues),$(IOBaseAddrValue)))
  795.     ifstr(i) $(IOBaseAddrIndex) == ""
  796.     set IOBaseAddrIndex = *($(IOBaseAddrList), 1)
  797.     endif
  798.     set BusNoIndex = *($(BusNoList), ~($(BusNoValues),$(BusNoValue)))
  799.     ifstr(i) $(BusNoIndex) == ""
  800.     set BusNoIndex = *($(BusNoList), 1)
  801.     endif
  802.     set IOBasePCMCIAIndex = *($(IOBasePCMCIAList), ~($(IOBasePCMCIAValues),$(IOBasePCMCIAValue)))
  803.     ifstr(i) $(IOBasePCMCIAIndex) == ""
  804.     set IOBasePCMCIAIndex = *($(IOBasePCMCIAList), $(IOBasePCMCIADefault))
  805.     endif
  806.     set MemWinIndex = *($(MemWinList), ~($(MemWinValues),$(MemWinValue)))
  807.     ifstr(i) $(MemWinIndex) == ""
  808.     set MemWinIndex = *($(MemWinList), $(MemWinDefault))
  809.     endif
  810.     set InterruptIndex = *($(InterruptList), ~($(InterruptValues),$(InterruptValue)))
  811.     ifstr(i) $(InterruptIndex) == ""
  812.     set InterruptIndex = *($(InterruptList), $(InterruptDefault))
  813.     endif
  814.     set ComPortIndex = *($(ComPortList), ~($(ComPortValues),$(ComPortValue)))
  815.     ifstr(i) $(ComPortIndex) == ""
  816.     set ComPortIndex = *($(ComPortList), $(ComPortDefault))
  817.     endif
  818.     set IOBasePCMCIAControllerIndex = *($(IOBasePCMCIAControllerList), ~($(IOBasePCMCIAControllerValues),$(IOBasePCMCIAControllerValue)))
  819.     ifstr(i) $(IOBasePCMCIAControllerIndex) == ""
  820.     set IOBasePCMCIAControllerIndex = *($(IOBasePCMCIAControllerList), 1)
  821.     endif
  822.     set WaitstateIndex = *($(WaitstateList), ~($(WaitstateValues),$(WaitstateValue)))
  823.     ifstr(i) $(WaitstateIndex) == ""
  824.     set WaitstateIndex = *($(WaitstateList), 1)
  825.     endif
  826.     set DatasizeIndex = *($(DatasizeList), ~($(DatasizeValues),$(DatasizeValue)))
  827.     ifstr(i) $(DatasizeIndex) == ""
  828.     set DatasizeIndex = *($(DatasizeList), 1)
  829.     endif
  830.     ;
  831.     ; This section runs the dialogs. From the main dialog (adapter parameter
  832.     ; setup) it is possible to enter the PCMCIA dialog if requested. When
  833.     ; exiting the PCMCIA dialog the user is returned to the main dialog.
  834.     ;
  835. adapteroptions = +
  836.     set from = adapteroptions
  837.     set OldNetAddress = $(NetworkAddress)
  838.     ;
  839.     ; Load DLL containing dialogs and verification routines
  840.     ;
  841.     LoadLibrary "Olicom Ethernet Driver Disk" $(DialogDllName) DialogHandle
  842. adapteroptions1 = +
  843.     ;
  844.     ; Read main dialog setup and show dialog
  845.     ;
  846.     ifstr(i) $(Option) == "OCE2XM"
  847.     read-syms AdapterParameterDlg$(!STF_LANGUAGE)
  848.     else
  849.     read-syms PCMCIAParameterDlg$(!STF_LANGUAGE)
  850.         ifstr(i) $(Option) == "GOCARD"
  851.         set DlgTemplate = "OCE2DLGP"
  852.     else
  853.         set DlgTemplate = "OCE2DLGPC"
  854.     endif
  855.     endif
  856.     ui start "InputDlg"  $(DialogHandle)
  857.     ui pop 1
  858.     ;
  859.     ; Save new settings because this dialog might be called again.
  860.     ; If CANCEL was pressed these values will not be used
  861.     ;
  862.     ifstr(i) $(Option) == "OCE2XM"
  863.     set IOBaseAddrIndex = $(Combo1Out)
  864.     set BusNoIndex = $(Combo2Out)
  865.     set NetworkAddress = *($(EditTextOut),1)
  866.     else
  867.     set IOBasePCMCIAIndex = $(Combo1Out)
  868.     set MemWinIndex = $(Combo2Out)
  869.     set InterruptIndex = $(Combo3Out)
  870.     set BusNoIndex = $(Combo4Out)
  871.     set ComPortIndex = $(Combo5Out)
  872.     set NetworkAddress = *($(EditTextOut),1)
  873.     endif
  874.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  875.     ;
  876.     ; parameters have already been stored at this stage
  877.     ;
  878.     goto nextstep
  879.     else-ifstr(i) $(DLGEVENT) == "EXIT"
  880.         set CommonStatus = STATUS_USERCANCEL
  881.         Debug-Output "Action: exit. Bye."
  882.     FreeLibrary $(DialogHandle)
  883.         goto end
  884.     else-ifstr(i) $(DLGEVENT) == "FREEBUTTON1"
  885.     ;
  886.     ; Read PCMCIA Advanced dialog setup and show dialog
  887.     ;
  888.     read-syms PCMCIAAdvancedDlg$(!STF_LANGUAGE)
  889.     ui start "InputDlg"  $(DialogHandle)
  890.     ui pop 1
  891.     ;
  892.     ; Save new settings because this dialog might be called again.
  893.     ; If CANCEL was pressed these values will not be used
  894.     ;
  895.     set IOBasePCMCIAControllerIndex = $(Combo1Out)
  896.     set WaitstateIndex = $(Combo2Out)
  897.     set DatasizeIndex = *($(RadioOut),1)
  898.     goto adapteroptions1
  899.     else
  900.         Debug-Output "Action: unknown: "$(DLGEVENT)
  901.     FreeLibrary $(DialogHandle)
  902.     goto end
  903.     endif
  904.  
  905. nextstep =+
  906.     ifstr $(NetworkAddress) != ""
  907.     ;
  908.     ; If network address has been entered then verify that it is a
  909.     ; valid address (not a multicast or broadcast address)
  910.     ;
  911.     set FLibraryErrCtl = 1
  912.     LibraryProcedure DlgResult $(DialogHandle) VerifyEthAddress $(NetworkAddress)
  913.     set FLibraryErrCtl = 0
  914.     ifstr $(DlgResult) != "STATUS_SUCCESS"
  915.         FreeLibrary $(DialogHandle)
  916.         set Error = $(DlgResult)
  917.         goto nonfatal
  918.     endif
  919.     endif
  920.     FreeLibrary $(DialogHandle)
  921.     ifint $(OldVersionExisted) == $(TRUE)
  922.         ifstr(i) $(!NTN_InstallMode) == configure
  923.             goto writeparameters
  924.         endif
  925.     endif
  926.     StartWait
  927.     Ifint $(OldVersionExisted) != $(FALSE)
  928.     Goto installhardware
  929.     Endif
  930.     ifstr(i) $(!NTN_InstallMode) == "install"
  931.        Ifstr(i) $(DoCopy) == "YES"
  932.       Ifstr(i) $(SrcDir) == ""
  933.              read-syms AskSourceDlgText
  934.              Shell $(subroutineinf) DoAskSourceEx $(SrcDir) $(DlgText)
  935.              Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  936.                 Goto ShellCodeError
  937.              Else-Ifstr(i) $($R0) == STATUS_FAILED
  938.                  Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  939.                  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  940.                      goto ShellCodeError
  941.                  endif
  942.                  set Error = $($R0)
  943.                  Goto fatal
  944.              Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  945.                  Goto successful
  946.              Endif
  947.              Set SrcDir = $($R1)
  948.           Endif
  949.        Endif
  950.        install "Install-Option"
  951.        ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  952.           Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  953.           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  954.               goto ShellCodeError
  955.           endif
  956.           set Error = $($R0)
  957.           goto fatal
  958.        endif
  959.     endif
  960.     Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  961.         $(ProductSoftwareName), +
  962.         $(ProductSoftwareName), +
  963.         $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  964.         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  965.         $(NetEventDLL), ""
  966.     Set OEM_ABANDON_SOFTWARE = TRUE
  967.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  968.         Debug-Output "ShellCode error"
  969.         goto ShellCodeError
  970.     endif
  971.     set RegistryErrorIndex = $($R0)
  972.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  973.         EndWait
  974.         Debug-Output "OEMNADUB.INF: Registry error: add software components"
  975.         CloseRegKey $($R1)
  976.         CloseRegKey $($R2)
  977.         CloseRegKey $($R3)
  978.         CloseRegKey $($R4)
  979.         CloseRegKey $($R5)
  980.         goto fatalregistry
  981.     endif
  982.     set SoftProductKey  = $($R1)
  983.     Set SoftNetRuleKey = $($R2)
  984.     Set SoftServiceKey  = $($R3)
  985.     Set SoftParameterKey        = $($R4)
  986.     Set SoftLinkageKey  = $($R5)
  987.     set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  988.                        {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  989.                        {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  990.                        {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  991.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  992.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  993.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  994.     Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  995.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  996.         Debug-Output "ShellCode error."
  997.         goto ShellCodeError
  998.     endif
  999.     set RegistryErrorIndex = $($R0)
  1000.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1001.         EndWait
  1002.         Debug-Output "Registry error: add value list."
  1003.         CloseRegKey $(SoftProductKey)
  1004.         CloseRegKey $(SoftNetRuleKey)
  1005.         CloseRegKey $(SoftServiceKey)
  1006.         CloseRegKey $(SoftParameterKey)
  1007.         CloseRegKey $(SoftLinkageKey)
  1008.         goto fatalregistry
  1009.     endif
  1010.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  1011.                         {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  1012.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  1013.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  1014.                         {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  1015.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  1016.     Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  1017.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1018.         Debug-Output "ShellCode error."
  1019.         goto ShellCodeError
  1020.     endif
  1021.     set RegistryErrorIndex = $($R0)
  1022.     CloseRegKey $(SoftProductKey)
  1023.     CloseRegKey $(SoftNetRuleKey)
  1024.     CloseRegKey $(SoftServiceKey)
  1025.     CloseRegKey $(SoftParameterKey)
  1026.     CloseRegKey $(SoftLinkageKey)
  1027.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1028.         EndWait
  1029.         Debug-Output "Registry error: add value list."
  1030.         goto fatalregistry
  1031.     endif
  1032. ;
  1033. ;   Insert hardware component in registry
  1034. ;
  1035. installhardware =+
  1036.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  1037.     ifint $($R4) != -1
  1038.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  1039.     endif
  1040.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1041.         Debug-Output "Cannot add hardware component"
  1042.         goto ShellCodeError
  1043.     endif
  1044.     set RegistryErrorIndex = $($R0)
  1045.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1046.         EndWait
  1047.         Debug-Output "Registry error: add hardware component"
  1048.         CloseRegKey $($R1)
  1049.         CloseRegKey $($R2)
  1050.         CloseRegKey $($R3)
  1051.         goto fatalregistry
  1052.     endif
  1053.     set KeyProduct = $($R1)
  1054.     set KeyAdapterRules = $($R2)
  1055.     set KeyParameters = $($R3)
  1056.     set AdapterNumber = $($R4)
  1057.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  1058.                {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  1059.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  1060.                        {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  1061.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  1062.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  1063.     Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  1064.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1065.         Debug-Output "ShellCode error"
  1066.         goto ShellCodeError
  1067.     endif
  1068.     CloseRegKey $(KeyProduct)
  1069.     Set KeyProduct = ""
  1070.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  1071.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  1072.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  1073.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  1074.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  1075.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  1076.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  1077.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1078.         Debug-Output "ShellCode error."
  1079.         goto ShellCodeError
  1080.     endif
  1081.     CloseRegKey $(KeyAdapterRules)
  1082.     set RegistryErrorIndex = $($R0)
  1083.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1084.         EndWait
  1085.         Debug-Output "Registry error: add value list."
  1086.         CloseRegKey $(KeyParameters)
  1087.         goto fatalregistry
  1088.     endif
  1089. ;
  1090. ; Write Adapter Parameters to registry
  1091. ;
  1092. writeparameters = +
  1093.     Shell $(UtilityInf), GetBusTypeNum
  1094.     set BusTypeNum = $($R1)
  1095.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1096.         Debug-Output "ShellCode error."
  1097.         goto ShellCodeError
  1098.     endif
  1099.     Ifstr(i) $(KeyParameters) == $(KeyNull)
  1100.         Debug-Output "*** KeyParameters is NULL at writeparameters"
  1101.     Endif
  1102.     ;
  1103.     ; Convert selections from combo-lists and radio-buttons into actual
  1104.     ; parameter values
  1105.     ;
  1106.     set IOBaseAddrValue = *($(IOBaseAddrValues), ~($(IOBaseAddrList),$(IOBaseAddrIndex)))
  1107.     set BusNoValue = *($(BusNoValues), ~($(BusNoList),$(BusNoIndex)))
  1108.     set IOBasePCMCIAValue = *($(IOBasePCMCIAValues), ~($(IOBasePCMCIAList),$(IOBasePCMCIAIndex)))
  1109.     set MemWinValue = *($(MemWinValues), ~($(MemWinList),$(MemWinIndex)))
  1110.     set InterruptValue = *($(InterruptValues), ~($(InterruptList),$(InterruptIndex)))
  1111.     set ComPortValue = *($(ComPortValues), ~($(ComPortList),$(ComPortIndex)))
  1112.     set IOBasePCMCIAControllerValue = *($(IOBasePCMCIAControllerValues), ~($(IOBasePCMCIAControllerList),$(IOBasePCMCIAControllerIndex)))
  1113.     set WaitstateValue = *($(WaitstateValues), ~($(WaitstateList),$(WaitstateIndex)))
  1114.     set DatasizeValue = *($(DatasizeValues), ~($(DatasizeList),$(DatasizeIndex)))
  1115.  
  1116.     ifstr(i) $(Option) == "GOCARDMF"
  1117.     ;
  1118.     ; If we're installing a ComboCard, update settings for Serial\parameters\serialoctk16 as well
  1119.     ; SERIALCOMM will be created automatically by serial.sys
  1120.     ;
  1121.     ifint $(ComPortValue) != 0
  1122.         OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Serial\Parameters\SerialOce2xm" $(MAXIMUM_ALLOWED) SerialHandle
  1123.         Ifstr $(SerialHandle) == $(KeyNull)
  1124.         OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Serial\Parameters" $(MAXIMUM_ALLOWED) SerialKey
  1125.         CreateRegKey $(SerialKey) {"SerialOce2xm",0,GenericClass} "" $(MAXIMUM_ALLOWED) "" SerialHandle
  1126.         CloseRegKey $(SerialKey)
  1127.         endif
  1128.         ifint $(ComPortValue) != 24
  1129.         set NewValueList = {{DosDevices,       $(NoTitle),$(!REG_VT_SZ),      $(ComPortIndex)},+
  1130.                     {ForceFifoEnable,  $(NoTitle),$(!REG_VT_DWORD),   0},+
  1131.                     {ForceShare,       $(NoTitle),$(!REG_VT_DWORD),   1},+
  1132.                     {Interrupt,        $(NoTitle),$(!REG_VT_DWORD),   $(InterruptValue)},+
  1133.                     {PortAddress,      $(NoTitle),$(!REG_VT_DWORD),   $(ComPortValue)}}
  1134.         Else
  1135.         set-add ComportBaseAddress = $(ComPortValue), $(IOBasePCMCIAValue)
  1136.         set NewValueList = {{DosDevices,       $(NoTitle),$(!REG_VT_SZ),      $(ComPortIndex)},+
  1137.                     {ForceFifoEnable,  $(NoTitle),$(!REG_VT_DWORD),   0},+
  1138.                     {ForceShare,       $(NoTitle),$(!REG_VT_DWORD),   1},+
  1139.                     {Interrupt,        $(NoTitle),$(!REG_VT_DWORD),   $(InterruptValue)},+
  1140.                     {PortAddress,      $(NoTitle),$(!REG_VT_DWORD),   $(ComportBaseAddress)}}
  1141.         Endif
  1142.         Shell  $(UtilityInf), AddValueList, $(SerialHandle), $(NewValueList)
  1143.         CloseRegKey $(SerialHandle)
  1144.         ;
  1145.         ; Update settings comm port in SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports section
  1146.         ;
  1147.         OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports" $(MAXIMUM_ALLOWED) SerialHandle
  1148.         Ifstr $(SerialHandle) == $(KeyNull)
  1149.             OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows NT\CurrentVersion" $(MAXIMUM_ALLOWED) SerialKey
  1150.             CreateRegKey $(SerialKey) {"Ports",0,GenericClass} "" $(MAXIMUM_ALLOWED) "" SerialHandle
  1151.             CloseRegKey $(SerialKey)
  1152.         endif
  1153.         SetRegValue $(SerialHandle) {$(ComPortIndex)":",$(NoTitle),$(!REG_VT_SZ), "9600,n,8,1"}
  1154.         CloseRegKey $(SerialHandle)
  1155.     Else
  1156.         ;
  1157.         ; Be nice and delete the COM stuff if user really wants so
  1158.         ; SERIALCOMM will be deleted automatically
  1159.         ;
  1160.         OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Serial\Parameters" $(MAXIMUM_ALLOWED) SerialHandle
  1161.         DeleteRegTree $(SerialHandle) "SerialOce2xm"
  1162.         CloseRegKey $(SerialHandle)
  1163.     Endif
  1164.     Endif
  1165.     ;
  1166.     ; Set up parameter list for AddValueList routine
  1167.     ;
  1168.     set NewValueList = {{IoBase,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)},+
  1169.             {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  1170.                         {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  1171.             {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNoValue)},+
  1172.             {IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBasePCMCIAValue)},+
  1173.             {IoLength,$(NoTitle),$(!REG_VT_DWORD),31},+
  1174.             {PCCARDAttributeMemoryAddress,$(NoTitle),$(!REG_VT_DWORD),$(MemWinValue)},+
  1175.             {PCCARDAttributeMemorySize, $(NoTitle),$(!REG_VT_DWORD),4096},+
  1176.             {PCCARDAttributeMemoryOffset, $(NoTitle),$(!REG_VT_DWORD),0},+
  1177.             {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(InterruptValue)},+
  1178.             {ComPortBase,$(NoTitle),$(!REG_VT_DWORD),$(ComPortValue)},+
  1179.             {PcmciaCtrlBase,$(NoTitle),$(!REG_VT_DWORD),$(IOBasePCMCIAControllerValue)},+
  1180.             {Pcmcia,$(NoTitle),$(!REG_VT_DWORD),1},+
  1181.                         {WaitStates,$(NoTitle),$(!REG_VT_DWORD),$(WaitstateValue)},+
  1182.             {DataSize,$(NoTitle),$(!REG_VT_DWORD),$(DatasizeValue)}}
  1183.     ifstr $(NetworkAddress) != ""
  1184.        set NewValueList = >($(NewValueList),{NetworkAddress,$(NoTitle),$(!REG_VT_SZ),$(NetworkAddress)})
  1185.     endif
  1186.     ;
  1187.     ; Now update registry
  1188.     ;
  1189.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  1190.     ;
  1191.     ; If the network address has been deleted then also delete it from
  1192.     ; the registry.
  1193.     ;
  1194.     ifstr $(OldNetAddress) != ""
  1195.        ifstr $(NetworkAddress) == ""
  1196.           DeleteRegValue $(KeyParameters) NetworkAddress
  1197.        endif
  1198.     endif
  1199.     ;
  1200.     ; If we're not installing a PCMCIA Card, remove PCMCIA specific settings
  1201.     ;
  1202.     ifstr(i) $(Option) == "OCE2XM"
  1203.         DeleteRegValue $(KeyParameters) IoBaseAddress
  1204.     DeleteRegValue $(KeyParameters) IoLength
  1205.         DeleteRegValue $(KeyParameters) PCCARDAttributeMemoryAddress
  1206.         DeleteRegValue $(KeyParameters) PCCARDAttributeMemorySize
  1207.         DeleteRegValue $(KeyParameters) PCCARDAttributeMemoryOffset
  1208.         DeleteRegValue $(KeyParameters) InterruptNumber
  1209.         DeleteRegValue $(KeyParameters) ComPortBase
  1210.         DeleteRegValue $(KeyParameters) PcmciaCtrlBase
  1211.         DeleteRegValue $(KeyParameters) Pcmcia
  1212.     DeleteRegValue $(KeyParameters) WaitStates
  1213.         DeleteRegValue $(KeyParameters) DataSize
  1214.     Endif
  1215.     ifstr(i) $(Option) == "GOCARD"
  1216.         DeleteRegValue $(KeyParameters) ComPortBase
  1217.     Endif
  1218.  
  1219.     CloseRegKey $(KeyParameters)
  1220.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1221.         Debug-Output "ShellCode error."
  1222.         goto ShellCodeError
  1223.     endif
  1224.     set RegistryErrorIndex = $($R0)
  1225.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1226.         Debug-Output "Registry error: Add value list"
  1227.         goto fatalregistry
  1228.     endif
  1229. ;
  1230. ; Add some keywords to the PCMCIA database in the registry
  1231. ;
  1232.     ifstr(i) $(Option) == "GOCARD"
  1233.     set PCMCIADatabaseKeyName = $(!NTN_ServiceBase)"\Pcmcia\DataBase"
  1234.     OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADatabaseKeyName) $(MAXIMUM_ALLOWED) PCMCIADatabaseKey
  1235.     ifstr $(PCMCIADatabaseKey) != $(NULL)
  1236.     ;        OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADatabaseKeyName) $(MAXIMUM_ALLOWED) PCMCIADatabaseOlicomKey
  1237.     ;        ifstr $(PCMCIADatabaseOlicomKey) != $(NULL) ; open succeeded, so delete it
  1238.     ;        CloseRegKey $(PCMCIADatabaseOlicomKey)
  1239.     ;        DeleteRegTree $(PCMCIADatabaseKey) "Olicom"
  1240.     ;        endif
  1241.         CreateRegKey $(PCMCIADatabaseKey) {"Olicom", 0, 0} "" $(MAXIMUM_ALLOWED) "" PCMCIADatabaseOlicomKey
  1242.         CreateRegKey $(PCMCIADatabaseOlicomKey) {"Ethercom", 0, 0} "" $(MAXIMUM_ALLOWED) 0 PCMCIADatabaseOlicom2220Key
  1243.         SetRegValue $(PCMCIADatabaseOlicom2220Key) {Driver, 0, $(!REG_VT_SZ),"oce2xm"}
  1244.         CloseRegKey $(PCMCIADatabaseOlicom2220Key)
  1245.         CreateRegKey $(PCMCIADatabaseOlicomKey) {"Ethernet", 0, 0} "" $(MAXIMUM_ALLOWED) 0 PCMCIADatabaseOlicom2220Key
  1246.         SetRegValue $(PCMCIADatabaseOlicom2220Key) {Driver, 0, $(!REG_VT_SZ),"oce2xm"}
  1247.         CloseRegKey $(PCMCIADatabaseOlicom2220Key)
  1248.     ;
  1249.     ;        When NT 3.51 sees our Combo cards, it enables a COM port only.
  1250.     ;        We therefore rely on our own enabling mechanism in these cases.
  1251.     ;
  1252.     ;        CreateRegKey $(PCMCIADatabaseOlicomKey) {"GoCard Ethernet+Modem 14400", 0, 0} "" $(MAXIMUM_ALLOWED) 0 PCMCIADatabaseOlicom2230Key
  1253.     ;        SetRegValue $(PCMCIADatabaseOlicom2230Key) {Driver, 0, $(!REG_VT_SZ),"oce2xm"}
  1254.     ;        CloseRegKey $(PCMCIADatabaseOlicom2230Key)
  1255.     ;        CreateRegKey $(PCMCIADatabaseOlicomKey) {"GoCard Ethernet+Modem 28800", 0, 0} "" $(MAXIMUM_ALLOWED) 0 PCMCIADatabaseOlicom2231Key
  1256.     ;        SetRegValue $(PCMCIADatabaseOlicom2231Key) {Driver, 0, $(!REG_VT_SZ),"oce2xm"}
  1257.     ;        CloseRegKey $(PCMCIADatabaseOlicom2231Key)
  1258.  
  1259.     ;        CloseRegKey $(PCMCIADatabaseOlicomKey)
  1260.     Endif
  1261.     Endif
  1262.     EndWait
  1263.     goto successful
  1264.  
  1265. bindingadapter =+
  1266.     set Error = "Binding: Sorry, not yet implemented."
  1267.     goto fatal
  1268.  
  1269. ;-----------------------------------------------
  1270. ; Remove Adapter Section
  1271. ;-----------------------------------------------
  1272. ;
  1273. ;   Remove all adapter information from the registry
  1274. ;
  1275. removeadapter = +
  1276.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  1277.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1278.             $(ProductSoftwareName)
  1279.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1280.             Debug-Output "ShellCode error"
  1281.             goto ShellCodeError
  1282.         endif
  1283.     set RegistryErrorIndex = $($R0)
  1284.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1285.             goto fatalregistry
  1286.         endif
  1287.     else
  1288.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1289.             $(ProductSoftwareName), $(!NTN_RegBase)
  1290.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1291.             Debug-Output "ShellCode error"
  1292.             goto ShellCodeError
  1293.         endif
  1294.     set RegistryErrorIndex = $($R0)
  1295.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1296.             goto fatalregistry
  1297.         endif
  1298.     ;
  1299.     ; Remove associated Com port
  1300.     ;
  1301.     ifstr(i) $(Option) == "GOCARDMF"
  1302.         OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Serial\Parameters" $(MAXIMUM_ALLOWED) SerialHandle
  1303.         DeleteRegTree $(SerialHandle) "SerialOce2xm"
  1304.         CloseRegKey $(SerialHandle)
  1305.     endif
  1306.     endif
  1307.     goto end
  1308.  
  1309. UpgradeSoftware = +
  1310.     ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  1311.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  1312.         Ifstr $(KeyProduct) != $(KeyNull)
  1313.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  1314.             set Version = *($(VersionInfo), 4)
  1315.             Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  1316.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1317.                 Debug-Output "ShellCode error"
  1318.                 goto ShellCodeError
  1319.             endif
  1320.             set !UG_Filename = $($R0)
  1321.             ifstr(i) $(!UG_Filename) != ""
  1322.                 install "Install-Update"
  1323.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1324.                     goto fatal
  1325.                 endif
  1326.             endif
  1327.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  1328.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  1329.             ifint $(Version) != $(ProductVersion)
  1330.             endif
  1331.             CloseRegKey $(KeyProduct)
  1332.         else
  1333.             goto fatalregistry
  1334.         endif
  1335.     else
  1336.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  1337.               $(MAXIMUM_ALLOWED) NetworkCardKey
  1338.         Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  1339.             GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  1340.             set ServiceName = *($(ServiceNameInfo), 4)
  1341.             OpenRegKey $(NetworkCardKey) "" "NetRules" +
  1342.                 $(MAXIMUM_ALLOWED) NetRuleKey
  1343.             Ifstr(i) $(NetRuleKey) != $(KeyNull)
  1344.             else
  1345.                 CloseRegKey $(NetworkCardKey)
  1346.                 goto fatalregistry
  1347.             endif
  1348.             CloseRegKey $(NetRules)
  1349.             CloseRegKey $(NetworkCardKey)
  1350.         else
  1351.             goto fatalregistry
  1352.         endif
  1353.         OpenRegKey $(!REG_H_LOCAL) "" +
  1354.               $(!NTN_ServiceBase)"\"$(ServiceName) +
  1355.               $(MAXIMUM_ALLOWED) ServiceKey
  1356.         Ifstr(i) $(ServiceKey) != $(KeyNull)
  1357.             CloseRegKey $(ServiceKey)
  1358.         else
  1359.             goto fatalregistry
  1360.         endif
  1361.     endif
  1362.     goto end
  1363. successful = +
  1364.     goto end
  1365. abandon = +
  1366.     ForListDo $(OEM_ABANDON_OPTIONS)
  1367.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1368.             $(ProductSoftwareName), $($)
  1369.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1370.             Debug-Output "ShellCode error"
  1371.             goto ShellCodeError
  1372.         endif
  1373.     set RegistryErrorIndex = $($R0)
  1374.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1375.             goto fatalregistry
  1376.         endif
  1377.     EndForListDo
  1378.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  1379.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1380.             $(ProductSoftwareName), FALSE
  1381.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1382.             Debug-Output "ShellCode error"
  1383.             goto ShellCodeError
  1384.         endif
  1385.     set RegistryErrorIndex = $($R0)
  1386.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1387.             goto fatalregistry
  1388.         endif
  1389.     endif
  1390.     goto end
  1391. warning = +
  1392.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1393.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1394.         goto ShellCodeError
  1395.     endif
  1396.     ifstr(i) $($R1) == "OK"
  1397.         goto $(to)
  1398.     else-ifstr(i) $($R1) == "CANCEL"
  1399.         goto $(from)
  1400.     else
  1401.         goto "end"
  1402.     endif
  1403. nonfatalinfo = +
  1404.     Set Severity = STATUS
  1405.     Set CommonStatus = STATUS_USERCANCEL
  1406.     goto nonfatalmsg
  1407. nonfatal = +
  1408.     Set Severity = NONFATAL
  1409.     goto nonfatalmsg
  1410. nonfatalmsg = +
  1411.     ifstr(i) $(Error) == ""
  1412.         Set Severity = NONFATAL
  1413.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1414.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1415.             goto ShellCodeError
  1416.         endif
  1417.         set Error = $($R0)
  1418.     endif
  1419.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1420.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1421.         goto ShellCodeError
  1422.     endif
  1423.     ifstr(i) $($R1) == "OK"
  1424.         goto $(from)
  1425.     else
  1426.         goto "end"
  1427.     endif
  1428. fatalregistry = +
  1429.     Shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) WARNING "Fatal Error"
  1430.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1431.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1432.         goto ShellCodeError
  1433.     endif
  1434.     set Error = $($R0)
  1435.     goto fatal
  1436. fatal = +
  1437.     ifstr(i) $(Error) == ""
  1438.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1439.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1440.             goto ShellCodeError
  1441.         endif
  1442.         set Error = $($R0)
  1443.     endif
  1444.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1445.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1446.         goto ShellCodeError
  1447.     endif
  1448.     goto setfailed
  1449. ShellCodeError = +
  1450.     set DlgType      = "MessageBox"
  1451.     set STF_MB_TITLE = "Error: "$(FunctionTitle)
  1452.     set STF_MB_TEXT  = "Shell Code Error"
  1453.     set STF_MB_TYPE  = 1
  1454.     set STF_MB_ICON  = 3
  1455.     set STF_MB_DEF   = 1
  1456.     ui start "Error Message"
  1457.     goto setfailed
  1458. setfailed = +
  1459.     set CommonStatus = STATUS_FAILED
  1460.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1461.         set OEM_ABANDON_ON = FALSE
  1462.         goto abandon
  1463.     endif
  1464.     goto end
  1465. end = +
  1466.     goto term
  1467. term = +
  1468.     Return $(CommonStatus)
  1469.  
  1470. [Install-Option]
  1471.     set STF_VITAL = ""
  1472.     ifstr(i) $(AddCopy) == "YES"
  1473.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1474.     endif
  1475.     Debug-Output "OEMSETNT.INF: [Install-Option] DoCopy = "$(DoCopy)
  1476.     ifstr(i) $(DoCopy) == "YES"
  1477.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1478.        CopyFilesInCopyList
  1479.     endif
  1480.     Exit
  1481.  
  1482. [Install-Update]
  1483.    set STF_VITAL        = ""
  1484.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1485.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1486.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1487.    AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1488.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1489.    CopyFilesInCopyList
  1490.    exit
  1491.  
  1492. [Install-Dll]
  1493.    set STF_VITAL     = ""
  1494.    ifstr(i) $(AddCopy) == "YES"
  1495.       AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1496.    endif
  1497.    ifstr(i) $(DoCopy) == "YES"
  1498.       set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1499.       CopyFilesInCopyList
  1500.    endif
  1501.    exit
  1502.  
  1503. [Source Media Descriptions]
  1504. ;   1  = "Olicom Ethernet Driver Disk"
  1505.     1  = "Windows NT DRVLIB"
  1506.  
  1507. [Signature]
  1508.     FileType = MICROSOFT_DRVLIB_FILE
  1509. [GetSignature]
  1510.     read-syms Signature
  1511.     return $(FileType)
  1512.  
  1513. [ProductType]
  1514. STF_PRODUCT  = Winnt
  1515. STF_PLATFORM = I386
  1516.  
  1517. [Files-Inf]
  1518. 1, oemsetup.inf, SIZE=999,       RENAME=$(!UG_Filename)
  1519.  
  1520. [Files-OCE2XM]
  1521. 1, OCE2XM.SYS,     SIZE=999
  1522.  
  1523. [Files-GOCARD]
  1524. 1, OCE2XM.SYS,     SIZE=999
  1525.  
  1526. [Files-GOCARDMF]
  1527. 1, OCE2XM.SYS,     SIZE=999
  1528. 1, serial.sys,     SIZE=999
  1529.  
  1530. [Files-Dll]
  1531. 1, oce2xm.dll,     SIZE=999
  1532. 1, oce2xm.hlp,     SIZE=999
  1533.  
  1534. [Files-dummy]
  1535.  
  1536.